package com.hdjk.view.entity;

import android.text.TextUtils;

import com.lst.projectlib.entity.BaseEntity;

/**
 * Created by sxy on 2017/11/3.
 */

public class HistoricalTransactionEntity extends BaseEntity {
    private String accountNumber;

    private String merchantNumber;

    private String fundCode;

    private String fundName;

    private String orderDate;

    private String portfolioId;

    private String rspId;

    private String transactionAmount;

    private String transactionCharge;

    private String transactionDate;

    private String transactionRate;

    private String transactionStatus;

    private String transactionType;

    private String transactionUnit;

    public void setAccountNumber(String accountNumber) {
        this.accountNumber = accountNumber;
    }

    public String getAccountNumber() {
        return this.accountNumber;
    }

    public void setMerchantNumber(String merchantNumber) {
        this.merchantNumber = merchantNumber;
    }

    public String getMerchantNumber() {
        return this.merchantNumber;
    }

    public void setFundCode(String fundCode) {
        this.fundCode = fundCode;
    }

    public String getFundCode() {
        return this.fundCode;
    }

    public void setFundName(String fundName) {
        this.fundName = fundName;
    }

    public String getFundName() {
        return this.fundName;
    }

    public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
    }

    public String getOrderDate() {
        return this.orderDate;
    }

    public void setPortfolioId(String portfolioId) {
        this.portfolioId = portfolioId;
    }

    public String getPortfolioId() {
        return this.portfolioId;
    }

    public void setRspId(String rspId) {
        this.rspId = rspId;
    }

    public String getRspId() {
        return this.rspId;
    }

    public void setTransactionAmount(String transactionAmount) {
        this.transactionAmount = transactionAmount;
    }

    public String getTransactionAmount() {
        return this.transactionAmount;
    }

    public void setTransactionCharge(String transactionCharge) {
        this.transactionCharge = transactionCharge;
    }

    public String getTransactionCharge() {
        return this.transactionCharge;
    }

    public void setTransactionDate(String transactionDate) {
        this.transactionDate = transactionDate;
    }

    public String getTransactionDate() {
        return this.transactionDate;
    }

    public void setTransactionRate(String transactionRate) {
        this.transactionRate = transactionRate;
    }

    public String getTransactionRate() {
        return this.transactionRate;
    }

    public void setTransactionStatus(String transactionStatus) {
        this.transactionStatus = transactionStatus;
    }

    public String getTransactionStatus() {
        return this.transactionStatus;
    }

    public String getTransactionStatusName() {
        String name = "";
        if (!TextUtils.isEmpty(transactionStatus))
            switch (transactionStatus) {
                case "failure":
                    name = "支付失败";
                    break;
                case "received":
                    name = "下单成功";
                    break;
                case "priced":
                    name = "确认成功";
                    break;
                case "completed":
                    name = "交易成功";
                    break;
                case "ipo.processing":
                    name = "认购确认成功";
                    break;
                case "pending.payment":
                    name = "等待付款";
                    break;
                case "canceling":
                    name = "撤单中";
                    break;
                case "canceled":
                    name = "已撤单";
                    break;
                case "pending.void":
                    name = "等待退款";
                    break;
                case "void":
                    name = "交易失败";
                    break;
//            case "payment":
//                name="支付过程中的过渡状态，前台请过滤这个状态";
//                break;
            }
        return name;
    }

    public void setTransactionType(String transactionType) {
        this.transactionType = transactionType;
    }

    public String getTransactionType() {
        return this.transactionType;
    }

    public String getTransactionTypeName() {
        String name = "";
        if (!TextUtils.isEmpty(transactionType))
        switch (transactionType) {
            case "buy":
                name = "申购";
                break;
            case "ipo":
                name = "认购";
                break;
            case "sell":
                name = "赎回";
                break;
            case "rsp":
                name = "定投";
                break;
            case "dividend":
                name = "红利再投";
                break;
            case "intra.swtich":
                name = "同公司转换";
                break;
            case "inter.switch":
                name = "跨公司转换";
                break;
            case "rapid.sell":
                name = "快速取现";
                break;
            case "sell.force":
                name = "强制赎回";
                break;
            case "units.increment":
                name = "份额强增";
                break;
            case "units.decrement":
                name = "份额强减";
                break;
        }
        return name;
    }

    public void setTransactionUnit(String transactionUnit) {
        this.transactionUnit = transactionUnit;
    }

    public String getTransactionUnit() {
        return this.transactionUnit;
    }

}
